Field of the Invention
The present invention relates to an information processing apparatus and information processing method for performing image processing, and a storage medium storing a program.
Description of the Related Art
In recent years, multi-function mobile phones (to be referred to as mobile computers hereinafter) incorporating a camera function have become widespread, and far surpass digital cameras and conventional personal computers (to be referred to as PCs hereinafter) in sales. The system of such a mobile computer is basically formed from three elements, that is, hardware as the computer itself, an operating system (to be referred to as an OS hereinafter) operating on the hardware, and an application operating on the OS. The user can activate a map, mail, or browser by using the application, and perform an operation such as browsing of a Web site on the Internet. As examples of the form of such an application operating on the mobile computer, there are mainly two application forms, that is, a native application and a Web application. The features of each application will be explained below.
The native application is normally developed in a development environment and development language which are prepared for each OS. For example, the C/C++ language is used on an OS provided by company A, the Java® language is used on an OS provided by company B, and a different development language is used on an OS provided by company C. In this way, the native application is developed in a different development language for each OS. The native application is compiled in advance in each development environment, and converted by an assembler from a so-called high-level language understandable by a human into instruction sets interpretable by the CPU of the computer. Thus, the native application has an advantage that a high-speed operation is possible because the CPU directly interprets instructions.
The Web application is an application operating on a Web browser which is normally incorporated in an OS on a computer. The Web application is generally developed using a language such as HTML5, CSS, or JavaScript® so as to enable interpretation by the Web browser. These languages are Web standard languages. Thus, once the application is described, it can operate in any environment where the Web browser operates. Japanese Patent Laid-Open No. 2011-233034 discloses an example of the Web application form. The body of the Web application described in HTML5, CSS, or JavaScript resides in a server outside a mobile computer. Since the Web application is downloaded from the server to the mobile computer via Internet connection at the time of use, the user can dynamically change a user interface (UI) design or the like without compiling the application in advance.
It is often the case recently that a mobile computer is equipped with a high-resolution camera. Since the mobile computer is carried daily and includes a memory capable of storing about several thousand photos, the user can casually enjoy photo shooting frequently. Image processing is very important for the user in order to perform filter processing for converting a photo image into, for example, a monochrome or sepia, or solve a problem that a photo is dark or the color balance is poor. The image processing is becoming an indispensable application. It is important in the application that such image processing can be simply provided to the user in a stress-free manner.
Generally, the Web application is executed by JavaScript on a browser or on a server under the security restriction on the browser. Conventionally, JavaScript is described as a script of a character string visually recognizable by a human, and can be executed by compiling the script at the time of the operation, as needed. However, there is a problem that the operation becomes slow when advanced and complicated image processing is described in JavaScript.
When it is built to execute image processing in a server, as in Japanese Patent Laid-Open No. 2011-233034, the time is necessary to upload, to the server via Internet connection, data such as a photo present inside a mobile computer, and download the result after image processing. This is a serious problem to a user who requests stress-free instant processing of the mobile application. In addition, processing in the server cannot be executed offline.
As described above, the native application has an advantage that processing can be performed at high speed. However, the native application needs to be developed separately in different development languages for respective OSs, so the development cost and development time increase. Also, the native application needs to be compiled in advance. It is difficult to, for example, change the UI design of the application at the time of the operation or dynamically add a function. The native application is lack of flexibility.
An application will be examined, in which all or most part of the UI is described in a so-called Web standard language such as HTML5, CSS3, or JavaScript, and a function described in a native language can be used from content described in the Web standard language. By installing such an application in a mobile computer, a system which implements the advantages of both the Web application and native application can be built on the mobile computer.
A case where, for example, a photo print application operates on such a system will be considered. For example, this application draws a print target photo, superimposes date information such as a shooting date/time on the photo, superimposes a stamp image such as a pictorial symbol, and prints the superimposition result. Drawing of print content is described using the Web standard language. For example, when generating print content by the canvas of HTML5, a drawing area is first reserved by the canvas, and a photo and a stamp image are superimposed using a drawImage function. For example, when drawing the respective images of a photo, date, and stamp image on one canvas, content is overwritten by the drawImage function as follows:
<script>
    var canvas=create a canvas    canvas.width=the lateral width of the canvas    canvas.height=the longitudinal width of the canvas    var ctx=obtain a context object for drawing content on the canvas    var img=PictureImage; //photo image    ctx.drawImage(img, ˜); //designate the size and position of the image by subsequent arguments    img=DateImage; //date image    ctx.drawImage(img, ˜); //superimpose the date image on the same canvas    img=StampImage; //stamp image    ctx.drawImage(img, ˜); //superimpose the stamp image on the same canvas</script>
To print the print content, it needs to be converted into image data (bitmap data) requested by the print engine of a printer. This processing is called rendering processing. In the rendering processing, bitmap data is obtained from the display area of the print content created on the UI of the application.
However, the resolution of bitmap data obtained from an image displayed on the UI is generally low, and the resolution of image data requested by the print engine is generally high. Hence, a jaggy or an image blur may be generated in enlargement processing from display image data to print image data. This image is not sharp and is not appropriate as a printed product.